package com.woniuxy.user.service.impl;

import com.netflix.discovery.converters.Auto;
import com.woniuxy.commons.entity.UserCollect;
import com.woniuxy.user.mapper.UserCollectMapper;
import com.woniuxy.user.service.UserCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:阳佳
 * @Date: 2020/7/23 18:52
 * @Description:
 * @PACKAGE_NAME:com.woniuxy.user.service.impl
 */
@Service
public class UserCollectServiceImpl implements UserCollectService {
    @Autowired
    private UserCollectMapper userCollectMapper;

    @Override
    public int addCollectRecord(UserCollect userCollect) {
        return userCollectMapper.addCollectRecord(userCollect);
    }

    @Override
    public int cancelCollect(String uid, String cid) {
        return userCollectMapper.cancelCollect(uid, cid);
    }


    @Override
    public List<UserCollect> myAllCollect(String uid) {
        return userCollectMapper.myAllCollect(uid);
    }

    @Override
    public UserCollect findCollectRecordByUidAndCid(String uid, String cid) {
        return userCollectMapper.findCollectRecordByUidAndCid(uid, cid);
    }
}
